package com.hydl.power.mapper;

import com.hydl.power.pojo.Inspectionplan;
import com.hydl.power.pojo.InspectionplanExample;
import com.hydl.power.utils.Resp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InspectionplanMapper {
    int deleteByPrimaryKey(Integer tid);

    int insert(Inspectionplan record);

    int insertSelective(Inspectionplan record);

    List<Inspectionplan> selectByExample(InspectionplanExample example);

    Inspectionplan selectByPrimaryKey(Integer tid);

    int updateByPrimaryKeySelective(Inspectionplan record);

    int updateByPrimaryKey(Inspectionplan record);

    /**
     * 按条件查询
     * @return
     */
    List<Inspectionplan> selectByCondition(@Param("pageNumKey") Integer pageNum, @Param("pageSizeKey") Integer pageSize, String taskType, String taskStatus, String maintainerId, String startTime, String endTime,String projectId);

    /**
     * 添加巡查计划
     * @return
     */
    int insert(String taskname,String tasktype,String taskcontent,String tasktime,
                                         String taskstatus,String roomname,String roomid,String maintainer,String maintainerid,String projectId,String projectName,String runmode
                                            ,String cityId,String cityName);

    /**
     * 删除计划
     * @return
     */
    Resp<Inspectionplan> deleteByPrimaryKey();

    /**
     * 修改计划
     * @param
     * @return
     **/
    int updateByPrimaryKeySelective(String taskname,String tasktype,String taskcontent,String tasktime,
                                    String taskstatus,String maintainer,String maintainerid,String roomname,String roomid,String runmode,String projectId,String projectName,
            String cityId,String cityName,Integer tid);

    /**
     * 根据id查询计划
     * @param
     * @return
     **/
    Inspectionplan queryplanById(Integer tid);

    List<Inspectionplan> queryplanByRunMode();

    List<Inspectionplan> queryplanByRunModeOnce();

    /*判断是否存在*/
    Inspectionplan queryIsExist(String roomid);


     List<Inspectionplan> queryAppUserInspectionplan(@Param("pageNumKey") Integer pageNum, @Param("pageSizeKey") Integer pageSize,String projectId, String creatTime);
}
